<?php

class openapi_api_function_v1_token extends openapi_api_function_base implements openapi_api_function_interface{

    public function get()
    {
    	$default_cur = kernel::single('ectools_mdl_currency')->getDefault();
    	$default_country = app::get('cellphone')->model('country')->getRow('*',array('isdefault'=>'1'));
    	$result['login_token'] = md5($_SERVER['SERVER_ADDR'].base_request::get_remote_addr().uniqid().mt_rand(0,9999));
    	$result['cur_sign'] = $default_cur['cur_sign'];
    	$result['country_name'] = $default_country['name'];
        return $this->apiData(true,$result,200);
    }
}